if node.$style() == 'qanda'
  div.qlist(id=node.$id(),class=['qanda', node.$role()])
    if node['$title?']()
      .title= node.$title()
    ol
      each item, i in node.$items()
        - questions = item[0]
        - answer = item[1]
        li
          each question in [].concat(questions)
            p
              em= question.$text()
            unless answer['$nil?']()
              if answer['$text?']()
                p= answer.$text()
              if answer['$blocks?']()
                | !{answer.$content()}
else if node.$style() == 'horizontal'
  .hdlist(id=node.$id(),class=node.$role())
    if node['$title?']()
      .title= node.$title()
    table
      if node['$attr?']('labelwidth') || node['$attr?']('itemwidth')
        colgroup
          col(width=node.$attr('labelwidth'))
          col(width=node.$attr('itemwidth'))
      each item in node.$items()
        - var terms = item[0]
        - var dd = item[1]
        tr
          td(class=['hdlist1', node['$option?']('strong') ? 'strong' : ''])
            - terms = [].concat(terms)
            - last_term = terms.$last()
            each dt in terms
              | !{dt.$text()}
              if dt != last_term
                br
          td.hdlist2
            unless dd['$nil?']()
              if dd['$text?']()
                p= dd.$text()
              if dd['$blocks?']()
                | !{dd.$content()}
else
  .dlist(id=node.$id(),class=[node.$style(), node.$role()])
    if node['$title?']()
      .title= node.$title()
    dl
      each item in node.$items()
        - terms = item[0]
        - dd = item[1]
        each dt in [].concat(terms)
          dt(class=node.$style() == false ? 'hdlist1' : '')
            | !{dt.$text()}
          unless dd['$nil?']()
            dd
              if dd['$text?']()
                p= dd.$text()
              if dd['$blocks?']()
                | !{dd.$content()}
